package de.recipeminer.ui.commands.listing;

import de.recipeminer.tools.LimitablePrintStream;
import de.recipeminer.ui.commands.UserCommand;
import de.recipeminer.ui.parsing.OptionParser;
import joptsimple.OptionSet;
import org.apache.log4j.Logger;

import static java.util.Arrays.asList;

/**
 * @autor: Markus Ackermann
 */
public class ListRecipesCommand extends UserCommand{
    private static Logger logger = Logger.getLogger(ListRecipesCommand.class);
    public static final String NAME = "list_recipes";

    @Override
    public boolean run(OptionSet options, LimitablePrintStream out) {
        return false;
    }

    @Override
    public String commandName() {
        return NAME;
    }

    @Override
    public void extendOptions(OptionParser parser) {
        parser.acceptsAll(asList("t","title"), "Regular expression to filter titles (syntax of Java-RE)")
                .withRequiredArg().withValuesConvertedBy(OptionParser.REGEXP_CONVERTER)
                .describedAs("pattern");
    }
}
